﻿
#region Imported Namespaces

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Xml.Serialization;

#endregion

namespace TupleGeo.Emergency.CAP {

  /// <summary>
  /// <para>
  /// The container for all component parts of the resource
  /// sub-element of the info sub-element of the alert element.
  /// </para>
  /// <para>
  /// The resource segment provides an optional reference to additional
  /// information related to the <see cref="AlertInfo">info</see> segment
  /// within which it appears in the form of a digital asset such as an
  /// image or audio file.
  /// </para>
  /// </summary>
  /// <remarks>
  /// <para>
  /// Optional
  /// </para>
  /// <para>
  /// Refers to an additional file with supplemental information related to
  /// the <see cref="AlertInfo">info</see> element, e.g. an image or audio file.
  /// </para>
  /// <para>
  /// Multiple instances MAY occur within an <see cref="AlertInfo">info</see> block.
  /// </para>
  /// </remarks>
  [SerializableAttribute()]
  [DesignerCategoryAttribute("code")]
  [XmlTypeAttribute(TypeName = "alertInfoResource", AnonymousType = true, Namespace = "urn:oasis:names:tc:emergency:cap:1.2")]
  [DataContractAttribute(Name = "alertInfoResource", Namespace = "urn:oasis:names:tc:emergency:cap:1.2")]
  [TypeConverterAttribute(typeof(ExpandableObjectConverter))]
  public partial class AlertInfoResource : EntityBase<AlertInfoResource> {

    #region Public Properties

    private string _description;

    /// <summary>
    /// 
    /// </summary>
    [XmlElementAttribute(ElementName = "resourceDesc", Order = 0)]
    [DataMemberAttribute(Name = "resourceDesc", Order = 0)]
    public virtual string Description {
      get {
        return this._description;
      }
      set {
        if ((this._description != null)) {
          if ((_description.Equals(value) != true)) {
            this._description = value;
            this.OnPropertyChanged("Description");
          }
        }
        else {
          this._description = value;
          this.OnPropertyChanged("Description");
        }
      }
    }

    private string _mimeType;

    /// <summary>
    /// 
    /// </summary>
    [XmlElementAttribute(ElementName = "mimeType", Order = 1)]
    [DataMemberAttribute(Name = "mimeType", Order = 1)]
    public virtual string MimeType {
      get {
        return this._mimeType;
      }
      set {
        if ((this._mimeType != null)) {
          if ((_mimeType.Equals(value) != true)) {
            this._mimeType = value;
            this.OnPropertyChanged("MimeType");
          }
        }
        else {
          this._mimeType = value;
          this.OnPropertyChanged("MimeType");
        }
      }
    }

    private string _fileSize;

    /// <summary>
    /// 
    /// </summary>
    [XmlElementAttribute(ElementName = "size", DataType = "integer", Order = 2)]
    [DataMemberAttribute(Name = "size", Order = 2)]
    public virtual string FileSize {
      get {
        return this._fileSize;
      }
      set {
        if ((this._fileSize != null)) {
          if ((_fileSize.Equals(value) != true)) {
            this._fileSize = value;
            this.OnPropertyChanged("FileSize");
          }
        }
        else {
          this._fileSize = value;
          this.OnPropertyChanged("FileSize");
        }
      }
    }

    private string _uri;

    /// <summary>
    /// 
    /// </summary>
    [XmlElementAttribute(ElementName = "uri", DataType = "anyURI", Order = 3)]
    [DataMemberAttribute(Name = "uri", Order = 3)]
    public virtual string Uri {
      get {
        return this._uri;
      }
      set {
        if ((this._uri != null)) {
          if ((_uri.Equals(value) != true)) {
            this._uri = value;
            this.OnPropertyChanged("Uri");
          }
        }
        else {
          this._uri = value;
          this.OnPropertyChanged("Uri");
        }
      }
    }

    private string _dereferencedUri;

    /// <summary>
    /// 
    /// </summary>
    [XmlElementAttribute(ElementName = "derefUri", Order = 4)]
    [DataMemberAttribute(Name = "derefUri", Order = 4)]
    public virtual string DereferencedUri {
      get {
        return this._dereferencedUri;
      }
      set {
        if ((this._dereferencedUri != null)) {
          if ((_dereferencedUri.Equals(value) != true)) {
            this._dereferencedUri = value;
            this.OnPropertyChanged("DereferencedUri");
          }
        }
        else {
          this._dereferencedUri = value;
          this.OnPropertyChanged("DereferencedUri");
        }
      }
    }

    private string _digest;

    /// <summary>
    /// 
    /// </summary>
    [XmlElementAttribute(ElementName = "digest", Order = 5)]
    [DataMemberAttribute(Name = "digest", Order = 5)]
    public virtual string Digest {
      get {
        return this._digest;
      }
      set {
        if ((this._digest != null)) {
          if ((_digest.Equals(value) != true)) {
            this._digest = value;
            this.OnPropertyChanged("Digest");
          }
        }
        else {
          this._digest = value;
          this.OnPropertyChanged("Digest");
        }
      }
    }

    #endregion

  }

}
